<%--
  Created by IntelliJ IDEA.
  User: ghostxbh
  Date: 2020/7/24
  Time: 11:52 上午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/webpage/include/taglib.jsp" %>
<html>
<head>
    <title>${searchName}</title>
    <%@include file="/webpage/include/front.jsp" %>
</head>
<body style="position: relative;">
<%@ include file="/webpage/include/header.jsp" %>
<%@ include file="/webpage/include/searchFrom.jsp" %>
<div class="mfw-container clearfix">
    <div class="mfw-wrapper">
        <div class="mfw-travelnotes" id="_j_tn">
            <div id="pagelet-block-e838192dc672744c65416d1ccd65384c" class="pagelet-block"
                 data-api=":note:pagelet:recommendNoteApi" data-params="{&quot;type&quot;:&quot;0&quot;}" data-async="1"
                 data-controller="/js/index/ControllerRecommend">
                <div id="_j_tn_content" style="display: block;">
                    <div id="_j_tn_content">
                        <div class="tn-list">
                            <ul>
                                <c:forEach items="${noteList}" var="note">
                                    <li>
                                        <div class="tn-item clearfix">
                                            <div class="tn-image">
                                                <a href="${ctxFront}/n/${note.code}.html" target="_blank">
                                                    <img src="${note.thumUrl}">
                                                </a>
                                            </div>
                                            <div class="tn-wrapper">
                                                <dl>
                                                    <dt>
                                                        <a href="${ctxFront}/n/${note.code}.html"
                                                           target="_blank">${note.title}</a>
                                                    </dt>
                                                    <dd>
                                                        <a href="${ctxFront}/n/${note.code}.html"
                                                           target="_blank">${fn:substring(note.contentsmd, 0, 100)}...</a>
                                                    </dd>
                                                </dl>
                                                <div class="tn-extra">
                                                    <%--<span class="tn-ding">
                                                        <a class="btn-ding" onclick="addLike(`${note.id}`)" title="赞"></a>
                                                        <em id="topvote19279564">${note.likeCount}</em>
                                                    </span>--%>
                                                    <span class="tn-place"><i></i>
                                                        <a href="${ctxFront}/search?city=${note.city}"
                                                           class="_j_gs_item"
                                                           rel="nofollow" data-name="${note.city}"
                                                           data-type="2">${note.city}</a>，by
                                                    </span>
                                                    <span class="tn-user">
                                                        <a href="${ctxFront}/u/author?id=${note.createBy.id}"
                                                           target="_blank" rel="nofollow">
                                                            <img src="${note.createBy.photo}">
                                                            ${note.createBy.name}
                                                        </a>
                                                    </span>
                                                    <span class="tn-nums">
                                                        <a href="${ctxFront}/n/like/${note.id}"><i></i></a>
                                                        ${note.readCount}
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                </c:forEach>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="mfw-aside">
        <div class="asidebox box-traveller box-activity">
            <div class="asidebox-hd">
                <h2 class="hd-title"><a href="#">旅行家专栏</a></h2>
                <%--                <a class="hd-right" href="#">查看更多&gt;</a>--%>
            </div>
            <div class="asidebox-bd" id="_j_traveller_slide">
                <ul class="slide-ul">
                    <c:forEach items="${travelers}" var="traveler">
                        <li>
                            <div class="image">
                                <a href="${ctxFront}/u/author?id=${traveler.id}" target="_blank">
                                    <img src="${traveler.photo}"/>
                                    <h3>${traveler.name}</h3>
                                </a>
                            </div>
                        </li>
                    </c:forEach>
                </ul>
            </div>
        </div>
        <div class="asidebox box-traveller box-activity">
            <div class="asidebox-hd">
                <h2 class="hd-title">精选旅游攻略</h2>
                <a class="hd-right" href="#">查看更多&gt;</a>
            </div>
            <div class="asidebox-bd" id="_j_activity_slide">
                <ul class="slide-ul" style="left: 0px;">
                    <c:forEach items="${selectedList}" var="note">
                        <li>
                            <div class="selected">
                                <a href="${ctxFront}/n/${note.code}.html" target="_blank">
                                    <img src="${note.thumUrl}" >
                                    <h3>${note.title}</h3>
                                </a>
                            </div>
                        </li>
                    </c:forEach>
                </ul>
            </div>
        </div>
    </div>
</div>
<script>
    function addLike(noteId) {
        $.ajax({
            method: 'GET',
            url: "/travel/f/n/like/" + noteId,
            data: {},
            success: function(res) {
                if (res.success) {
                    alert("已点赞");
                }
            }
        });
    }
</script>
<style>
    #banner-con-gloable .banner-btn-con {
        width: 100%;
        height: 162px;
        background: #0C151E;
        opacity: .8;
        position: absolute;
        bottom: 0;
    }

    #banner-con-gloable .banner-btn-con .close-btn {
        position: absolute;
        right: 35px;
        top: 24px;
        z-index: 120;
        height: 24px;
        width: 24px;
        cursor: pointer;
    }

    #banner-con-gloable .banner-image-con {
        position: absolute;
        right: 50%;
        bottom: 0;
        width: 1000px;
        margin-right: -500px;
    }

    #closed {
        height: 24px;
        width: 24px;
        vertical-algin: top;
        border: none;
        cursor: pointer;
    }
</style>
<%@ include file="/webpage/include/footer.jsp" %>
</body>
</html>
